BOOK=test-book
ARTICLE=test-article
BOOKFO=$(FODIR)/$(BOOK).fo
BOOKPDF=$(PDFDIR)/$(BOOK).pdf
ARTICLEFO=$(FODIR)/$(ARTICLE).fo
ARTICLEPDF=$(PDFDIR)/$(ARTICLE).pdf

all: $(BOOKPDF) $(ARTICLEPDF)

$(BOOKPDF): $(BOOKFO)
	$(FOP) -c $(FOPCFG) -fo $(BOOKFO) -pdf $(BOOKPDF)

$(BOOKFO): $(FO_XSL) $(BOOK).xml
	$(XMLLINT) $(XMLLINTPARAM) $(BOOK).xml
	$(XSLTPROC) $(XSLTPARAM) --stringparam config "$(CFGDIR)/ko.xml" $(FO_XSL) $(BOOK).xml > $(BOOKFO)

$(ARTICLEPDF): $(ARTICLEFO)
	$(FOP) -c $(FOPCFG) -fo $(ARTICLEFO) -pdf $(ARTICLEPDF)

$(ARTICLEFO): $(FO_XSL) $(ARTICLE).xml
	$(XMLLINT) $(XMLLINTPARAM) $(ARTICLE).xml
	$(XSLTPROC) $(XSLTPARAM) --stringparam config "$(CFGDIR)/ko.xml" $(FO_XSL) $(ARTICLE).xml > $(ARTICLEFO)

.PHONY: all


